package com.atguigu.gulimall.product.vo;

import com.atguigu.gulimall.product.entity.SkuImagesEntity;
import com.atguigu.gulimall.product.entity.SkuInfoEntity;
import com.atguigu.gulimall.product.entity.SpuInfoDescEntity;
import com.atguigu.gulimall.product.service.SkuInfoService;
import lombok.Data;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * @description:
 * @author: BlueSky
 * @create: 2021-09-15 16:35
 **/
@Data
public class SkuItemVo {
	//1、sku基本信息
	SkuInfoEntity info;
	//2、sku图片信息
	List<SkuImagesEntity> images;
	//3、获取spu得销售属性组合。
	List<SkuItemSaleAttrVo> saleAttr;
	//4、获取spu介绍
	SpuInfoDescEntity desp;
	//5、获取spu得规格参数信息
	List<SpuItemAttrGroupVo> groupAttrs;

	@Data
	public static class SkuItemSaleAttrVo {
		private Long attrId;
		private String attrName;
		private String attrValues;
	}

	@Data
	public static class SpuItemAttrGroupVo {
		private String groupName;
		private List<SpuBaseAttrVo> attrs;
	}

	@Data
	public static class SpuBaseAttrVo {
		private String attrName;
		private String attrValue;
	}

}
